module.exports = {
  DateDiff(sDate1, sDate2) {
    console.log(sDate1,sDate2)
    var oDate1, oDate2, iDays;
    if (typeof sDate1 == "string") {
      oDatae1 = new Date(Date.parse(sDate1));
    } else {
      oDate1 = sDate1;
    }
    //sDate1和sDate2是2006-12-18格式
    if (typeof sDate2 == "string") {
      oDatae2 = new Date(Date.parse(sDate2));
    } else {
      oDate2 = sDate2;
    }
    iDays = Math.floor((oDate1 - oDate2) / 1000 / 60 / 60 / 24); //把相差的毫秒数转换为天数
    return iDays;
  },
};
